package com.neusoft.mybatisplustest.service.impl;


import com.neusoft.mybatisplustest.mapper.DeptPlusMapper;
import com.neusoft.mybatisplustest.po.Dept;
import com.neusoft.mybatisplustest.service.DeptPlusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DeptPlusServiceImpl implements DeptPlusService {

    @Autowired
    DeptPlusMapper deptPlusMapper;
    @Override
    public List<Dept> getDeptPulss() {
        return deptPlusMapper.selectList(null);
    }

    @Override
    public Dept getDeptById(Integer deptno) {
        return deptPlusMapper.selectById(deptno);
    }

    @Override
    public int insertDept(Dept dept) {
        return deptPlusMapper.insert(dept);
    }

    @Override
    public int updateDept(Dept dept) {
        return deptPlusMapper.updateById(dept);
    }

    @Override
    public int deleteDept(Integer deptno) {
        return deptPlusMapper.deleteById(deptno);
    }
}
